import { createI18n } from 'vue-i18n'
// import { useStoreApp } from '@/stores'
import type { App } from 'vue'
// const appStore = useStoreApp()

import en from './package/en'
import zhCn from './package/zh-cn'

const messages = {
  'zh-cn': {
    ...zhCn
  },
  en: {
    ...en
  }
}

const i18n = createI18n({
  legacy: false,
  locale: 'zh-CN',
  messages
})

export function setupI18n(app: App) {
  app.use(i18n)
}

export default i18n
